package oop.data;


import java.util.Map;

/**
 * 行数据对象
 */
public class RowData  {
	private String fatherName;
    private String[] columns;
    private Map<String, String> datas;
    
    public RowData(String fatherName,String[] columns, Map<String, String> datas) {
    	this.fatherName = fatherName;
        this.columns = columns;
        this.datas = datas;
    }
    
    public String getValue(String key) {
        return datas.get(key);
    }
    
    public String getValue(int index) {
        return datas.get(columns[index]);
    }
    
    public String getKey(int index) {
        return columns[index];
    }
    public String[] getColumn(){
    	return this.columns;
    }
    public String getFatherName()
    {
    	return this.fatherName;
    }
    public Integer size() {
        return columns.length;
    }
    public void setDatas(String key,String value){
    	datas.put(key,value);
    }

}
